.task-page-container {
  .search-container {
    transition: all 0.3s ease;
    
    &:hover {
      transform: translateY(-2px);
    }

    .ant-input-affix-wrapper {
      transition: all 0.3s ease;
      
      &:hover, &:focus {
        transform: translateX(4px);
      }
    }

    @media screen and (max-width: 576px) {
      .ant-input-affix-wrapper {
        max-width: 100% !important;
      }
      .ant-btn {
        margin-top: 12px;
        margin-left: 0 !important;
        width: 100%;
      }
    }
  }

  .task-cards-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px;
    max-width: 800px;
    margin: 0 auto;

    .task-card {
      cursor: pointer;
      transition: all 0.3s ease;
      width: 100%;

      &:hover {
        transform: translateX(4px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      }

      .ant-card-body {
        padding: 20px;
      }

      .task-title {
        margin-bottom: 16px;
        font-size: 16px;
        line-height: 1.5;
      }

      .task-meta {
        display: flex;
        align-items: center;
        gap: 24px;
        margin-bottom: 16px;

        .meta-item {
          display: flex;
          align-items: center;
          gap: 8px;
        }
      }

      .task-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 16px;
      }
    }
  }

  .ant-pagination {
    margin-top: 24px;
    text-align: center;
    
    @media screen and (max-width: 576px) {
      .ant-pagination-options {
        display: none;
      }
    }
  }
}

.task-page {
  min-height: 100vh;

  .task-grid-container {
    margin-top: 16px;
    
    .task-card-wrapper {
      .animate-in {
        animation: slideIn 0.3s ease-out;
      }
    }

    .task-card {
      height: 100%;
      transition: all 0.3s ease;
      border-radius: 12px;
      overflow: hidden;
      max-width: 800px;
      margin: 0 auto;
      background: #fff;
      border: 1px solid #f0f0f0;
      
      &:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
        border-color: #e6f7ff;
      }

      .task-card-content {
        display: flex;
        flex-direction: column;
        gap: 16px;
        @media screen and (max-width: 768px) {
          gap: 8px;
        }

        .task-header {
          display: flex;
          justify-content: space-between;
          align-items: center;

          .category-tag {
            font-size: 13px;
            padding: 4px 12px;
            border-radius: 4px;
          }

          .status-tag {
            font-size: 13px;
            padding: 4px 12px;
            border-radius: 4px;
          }
        }

        .task-main {
          flex: 1;

          .task-title {
            margin: 12px 0 16px;
            color: #262626;
            font-size: 18px;
            line-height: 1.4;

            &:hover {
              color: #1890ff;
            }
          }

          .task-info {
            display: flex;
            align-items: center;
            gap: 24px;
            margin-top: 16px;

            .task-price, .task-time {
              display: flex;
              align-items: center;
              gap: 8px;

              .anticon {
                font-size: 16px;
                opacity: 0.6;
              }

              .price-icon {
                color: #f5222d;
              }

              .time-icon {
                color: #8c8c8c;
              }
            }

            .task-price {
              .price {
                font-size: 20px;
                font-weight: 600;
                color: #f5222d;
              }
            }

            .task-time {
              color: #8c8c8c;
              font-size: 14px;
            }
          }
        }

        .task-footer {
          display: flex;
          justify-content: flex-end;
          padding-top: 16px;
          border-top: 1px solid #f0f0f0;

          .submit-button {
            padding: 6px 20px;
            height: auto;
            font-size: 15px;
            border-radius: 6px;
          }
        }
      }
    }

    .empty-container {
      margin: 48px 0;
      padding: 24px;
      background: #fff;
      border-radius: 12px;
    }
  }

  .pagination-container {
    margin-top: 32px;
    padding: 16px 0;
    text-align: center;
    background: #fff;
    border-radius: 12px;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

// 优化模态框在移动端的显示
.task-detail-modal {
  @media (max-width: 768px) {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0;
    top: 0;
    
    .ant-modal-content {
      border-radius: 0;
      min-height: 100vh;
    }
    
    .ant-modal-body {
      padding: 12px;
    }
  }
}

// 新增样式
.task-page {
  min-height: 100vh;
  // background-color: #f5f5f5;
  // padding: 16px;

  @media (max-width: 768px) {
    padding: 12px;
  }

  .search-container {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 16px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;

    @media (max-width: 768px) {
      padding: 12px;
      margin: -12px -12px 12px -12px;
      border-radius: 0;
    }

    .ant-input-search {
      max-width: 600px;
      margin: 0 auto;
      display: block;

      .ant-input {
        border-radius: 24px 0 0 24px;
        font-size: 16px;
        
        &:focus, &:hover {
          box-shadow: none;
          border-color: #1890ff;
        }
      }

      .ant-input-group-addon {
        .ant-btn {
          border-radius: 0 24px 24px 0 !important;
          font-size: 16px;
          height: 40px;
          padding: 0 24px;
        }
      }
    }
  }

  .content-container {
    background-color: #fff;
    border-radius: 8px;
    // padding: 16px;
    min-height: calc(100vh - 140px);

    @media (max-width: 768px) {
      // padding: 12px;
      border-radius: 4px;
    }
  }

  .empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    
    .empty-text {
      color: #999;
      font-size: 16px;
    }
  }
}

// 修改表格样式使其更适合移动端
.ant-table {
  @media (max-width: 768px) {
    .ant-table-thead {
      display: none;
    }

    .ant-table-row {
      display: block;
      border-bottom: 1px solid #f0f0f0;
      padding: 12px 0;

      &:last-child {
        border-bottom: none;
      }
    }

    .ant-table-cell {
      display: block;
      width: 100% !important;
      padding: 4px 8px !important;
      border: none !important;
      
      &:before {
        content: attr(data-label);
        font-weight: 500;
        margin-right: 8px;
        color: #666;
      }
    }
  }
}

// 优化模态框在移动端的显示
.task-detail-modal {
  .ant-modal-content {
    border-radius: 12px;
    overflow: hidden;
  }

  .task-description {
    img {
      max-width: 100%;
      border-radius: 8px;
    }

    p {
      margin-bottom: 12px;
      line-height: 1.6;
    }
  }

  .ant-card {
    transition: all 0.3s ease;
    
    &:hover {
      transform: translateY(-2px);
    }
  }

  @media screen and (max-width: 576px) {
    .ant-modal {
      max-width: 100% !important;
      margin: 0;
    }
    
    .ant-modal-content {
      border-radius: 0;
    }
  }
}

// 添加任务列表的移动端样式
.task-table {
  .task-list-table {
    .task-title-cell {
      .title {
        display: block;
        margin-bottom: 8px;
        font-size: 16px;
      }

      .task-meta {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;

        .price {
          font-size: 16px;
          color: #ff4d4f;
          font-weight: 500;
        }
      }
    }

    .ant-table-pagination {
      margin: 16px 0 0 0;
    }

    @media (max-width: 768px) {
      .ant-table-cell {
        &[data-label]:before {
          display: none;
        }
      }

      .task-title-cell {
        padding: 8px 0;

        .title {
          font-size: 15px;
          line-height: 1.4;
        }

        .task-meta {
          margin-top: 8px;
        }
      }

      .ant-table-row {
        background: #fff;
        margin-bottom: 8px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        
        &:last-child {
          margin-bottom: 0;
        }
      }

      .ant-btn {
        width: 100%;
        margin-top: 8px;
      }
    }
  }
}

.task-page {
  min-height: 100vh;

  .search-card {
    .ant-card-body {
      padding: 16px;
    }

    @media (max-width: 768px) {
      .ant-card-body {
        padding: 12px;
      }
    }
  }

  .ant-drawer {
    .ant-drawer-header {
      padding: 16px 20px;
      border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .ant-drawer-title {
      font-size: 18px;
      font-weight: 500;
    }

    .ant-list-item {
      transition: all 0.3s ease;

      &:active {
        background-color: #f0f0f0;
      }
    }
  }

  .ant-col {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .ant-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  @media (max-width: 768px) {
    .ant-card {
      border-radius: 12px;
    }

    .content-container {
      margin-top: 16px;
    }

    .ant-input-search {
      .ant-input {
        font-size: 16px;
      }
      .ant-input-search-button {
        height: 40px;
      }
    }
  }
}
